package edu.nwpu.pojo;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class Order {
    
    /**
     * 状态码
     * 1：未付款  2：已付款  3：已送达  4：已取消  5：已删除  6：已接单  7：已配送
     * 当订单设置为已删除，用户将无法看到，管理员可以看到，但不能修改
     * status code
     */

    /**
     * 订单信息编号，必须唯一
     * order information's id, must unique
     */
    private Long id;

    /**
     * 收货信息
     * delivery information
     */
    private RecvInfo recvInfo;

    /**
     * 购买的<食物, 个数>，订单里面的foods是不能修改的
     * list of food purchased
     */
    private List<FoodCount> foods;

    /**
     * 付款金额
     * payment amount
     */
    private Double amount;

    /**
     * 下单时间
     * order time
     */
    private Date orderTime;

    /**
     * 状态码
     * status code
     */
    private Integer statusCode; 

    /**
     * 所属用户id
     */
    private Long userId;

    public Order() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public RecvInfo getRecvInfo() {
        return recvInfo;
    }

    public void setRecvInfo(RecvInfo recvInfo) {
        this.recvInfo = recvInfo;
    }

    public List<FoodCount> getFoods() {
        return foods;
    }

    public void setFoods(List<FoodCount> foods) {
        this.foods = foods;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", recvInfo=" + recvInfo +
                ", foods=" + foods +
                ", amount=" + amount +
                ", orderTime=" + orderTime +
                ", statusCode=" + statusCode +
                ", userId=" + userId +
                '}';
    }
}
